//
//  LoginViewController.h
//  NavCon2
//
//  Created by Joseph Ayo Akinyele on 3/11/10.
//  Copyright 2010 Johns Hopkins University. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CCRViewController.h"
#import "CustCCRViewController.h"
#import "OffCCRViewController.h"
#import "GoogleHealth.h"
#import "JHUHospital.h"
#import "SqliteInterface.h"
#import "CCRObject.h"
@class CCRViewController;
@class CustCCRViewController;
@class OffCCRViewController;

@interface LoginViewController : UIViewController {
	//IBOutlet UILabel *label1;
	IBOutlet UITextField *username, *password;
	IBOutlet UIActivityIndicatorView *activityIndicator;
	
	BOOL GoogleHealthLogin;
	BOOL JHUHospitalLogin;
	BOOL OfflineAccessLogin;
	GoogleHealth *googlehealth;
	JHUHospital *jhu;
	SqliteInterface *sql;
	NSDictionary *profile; // used for local access
	CCRViewController *ccrViewController; // only used for Google Health
	CustCCRViewController *customViewController; // only used for JHU Hospital
	OffCCRViewController *offlineViewController; // only used for local access
}

//@property (nonatomic, retain) UILabel *label1;
@property (nonatomic, retain) UITextField *username, *password;
@property (nonatomic) BOOL GoogleHealthLogin, JHUHospitalLogin, OfflineAccessLogin;
@property (nonatomic, retain) UIActivityIndicatorView *activityIndicator;
@property (nonatomic, retain) GoogleHealth *googlehealth;
@property (nonatomic, retain) JHUHospital *jhu;

-(IBAction) loginButtonPressed: (id) sender;
-(IBAction) removeKeyboard: (id) sender;
-(IBAction) backgroundClick: (id) sender;

// test activity indicator
-(IBAction) startActivityIndicator: (id) sender;
-(IBAction) stopActivityIndicator: (id) sender;
// end test

-(void) fetchFeedOfProfileList;
-(void) loadProfileView;
-(void) loadLocalProfileView:(NSString *) user;
-(void) loginFailed:(NSString *) message withTitle:(NSString *) mytitle;

@end
